package cn.kengtion.shopcart.Utils;

import com.google.gson.Gson;

import cn.kengtion.shopcart.Bean.GoodBean;

/**
 * 创建时间 2017/10/30
 * 创建人 洪坤峰
 * 功能描述：
 */

public class MsgPharser {
    public static String GoodsToString(GoodBean goodBean){
        Gson gson = new Gson();
        return gson.toJson(goodBean);
    }
    public static GoodBean StringToGoods(String msg){
        Gson gson = new Gson();
        return gson.fromJson(msg , GoodBean.class);
    }
}
